---
title: SAIF.Business.View.Policy operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SAIF.Business.View.Policy operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's step-by-step logic is documented in the tables below.

## Operation catalog
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Retrieve policy data](operations/op-01-retrieve-policy-data.md) | Load the core policy view aggregate | Consumer calls `GetPolicyData` | Policy number, optional period date/user context/detail flag | Populated `clsPolicyData` | [BR-VP-001](business-rules.md#br-vp-001-policy-number-must-be-valid-before-retrieve), [BR-VP-016](business-rules.md#br-vp-016-market-type-mapping) | N/A — Stored procedure | [SQL-010](sql/SQL-010-getpolicy.md) |
| [Lazy retrieval of policy detail and indicators](operations/op-02-lazy-retrieve-policy-detail.md) | Fetch detail-backed fields on demand | Consumer reads a detail-backed property | Policy number | Detail fields, flags | [BR-VP-026](business-rules.md#br-vp-026-detail-read-failure-does-not-fail-overall-retrieve) | N/A — Stored procedure | [SQL-011](sql/SQL-011-getviewdetail.md), [SQL-012](sql/SQL-012-get-policy-waiver-count.md), [SQL-015](sql/SQL-015-secondary-policy-status.md), [SQL-016](sql/SQL-016-coverage-bound-flag.md), [SQL-017](sql/SQL-017-info-page-printed.md), [SQL-018](sql/SQL-018-getgaps.md) |
| [Retrieve policy periods and select the current/renewal period](operations/op-03-retrieve-policy-periods.md) | Load policy terms and identify current/renewal period | Consumer reads `PolicyPeriods` | Policy number | `clsPolicyPeriodCollection` | [BR-VP-018](business-rules.md#br-vp-018-currentrenewal-period-selection), [BR-VP-019](business-rules.md#br-vp-019-latest-printed-information-page-period) | N/A — Stored procedure | [SQL-021](sql/SQL-021-getspecificlimitsforpolicynum.md), [SQL-022](sql/SQL-022-getpolicyperiods.md) |
| [Retrieve policy associations](operations/op-04-retrieve-policy-associations.md) | Build the policy-to-policy association list | Consumer reads `Associations` | Policy number, optional dates | List of `PolicyAssociation` | [BR-VP-014](business-rules.md#br-vp-014-source-policy-excluded-from-associations-by-default), [BR-VP-015](business-rules.md#br-vp-015-preferred-association-type-overrides-derived-type), [BR-VP-020](business-rules.md#br-vp-020-association-type-is-secured-when-security-group-set), [BR-VP-021](business-rules.md#br-vp-021-association-category-prefix-classification), [BR-VP-024](business-rules.md#br-vp-024-default-association-dates) | [POLICY_RELATIONSHIP](database-tables.md#policy_relationship), [POLICY](database-tables.md#policy), [COMBO_POLICY_PERIOD](database-tables.md#combo_policy_period), [POLICY_PERIOD](database-tables.md#policy_period), [ER_COMBINATION_POLICY](database-tables.md#er_combination_policy), [ASSOCIATION_TYPE_CODE](database-tables.md#association_type_code) | [SQL-003](sql/SQL-003-period-date-query.md), [SQL-004](sql/SQL-004-non-typed-association-lookup.md), [SQL-005](sql/SQL-005-association-type-code-lookup.md), [SQL-034](sql/SQL-034-policy-association-list.md), [SQL-035](sql/SQL-035-max-policy-effective-date.md) |
| [Retrieve the service team and derive email addresses](operations/op-05-retrieve-service-team.md) | Load the assigned service team and resolve emails | Consumer reads `TeamAssignmentCollection` | Policy number | `clsTeamAssignmentCollection` | [BR-VP-010](business-rules.md#br-vp-010-demo-users-see-masked-data), [BR-VP-022](business-rules.md#br-vp-022-team-member-email-address-derivation) | N/A — Stored procedure | [SQL-029](sql/SQL-029-cp-external-client-lookup.md), [SQL-030](sql/SQL-030-sp73341-external-client-lookup.md), [SQL-031](sql/SQL-031-team-assign-query.md) |
| [Retrieve addresses](operations/op-06-retrieve-addresses.md) | Load mailing/location/claim address and officer-of-notice | `GetPolicyAddress` / `GetPolicyClaimAddress` | Policy number, address/contact type | `clsPolicyAddress` | [BR-VP-010](business-rules.md#br-vp-010-demo-users-see-masked-data) | [BUSINESS_AFFILIATE](database-tables.md#business_affiliate), [AFFILIATE](database-tables.md#affiliate) | [SQL-007](sql/SQL-007-getpolicyaddress.md), [SQL-008](sql/SQL-008-getpolicyaddressbylocseqnum.md), [SQL-009](sql/SQL-009-officer-of-notice-lookup.md) |
| [Authorize a user for a policy](operations/op-07-authorize-user.md) | Decide whether the current user may view a policy | Caller invokes `IsPolicyValidForUser` | Policy data, user context | `Boolean` | [BR-VP-003](business-rules.md#br-vp-003-secure-policy-requires-ad-authorization), [BR-VP-004](business-rules.md#br-vp-004-invalid-or-zero-policy-number-is-never-valid), [BR-VP-005](business-rules.md#br-vp-005-access-granted-per-user-access-level-matrix), [BR-VP-006](business-rules.md#br-vp-006-auditor-60-day-access-window), [BR-VP-007](business-rules.md#br-vp-007-loss-control-prefix-match), [BR-VP-008](business-rules.md#br-vp-008-demo-loss-control-matched-on-useridname), [BR-VP-009](business-rules.md#br-vp-009-fallback-to-parent-policy-authorization) | [PA_AUDIT](database-tables.md#pa_audit), [PA_AUDITOR](database-tables.md#pa_auditor), [PA_POLICY_PERIOD](database-tables.md#pa_policy_period) | [SQL-013](sql/SQL-013-getparentpolicy.md), [SQL-023](sql/SQL-023-cp-policy-in-group.md), [SQL-024](sql/SQL-024-auditor-access-count.md) |
| [Retrieve the accessible policy list for a user](operations/op-08-retrieve-accessible-policy-list.md) | Build the set of policies a user may select | Caller reads `PolicySecurity.PolicyList` | User context | `strPolicyList` entries | [BR-VP-005](business-rules.md#br-vp-005-access-granted-per-user-access-level-matrix) | N/A — Stored procedure | [SQL-025](sql/SQL-025-cp-claimprofile-get-group-policy-list.md), [SQL-026](sql/SQL-026-cp-claimprofile-get-sc-book.md), [SQL-027](sql/SQL-027-cp-get-agent-online-policy-list.md), [SQL-028](sql/SQL-028-fee-auditor-policy-list.md) |
| [Retrieve affiliated policies (legacy)](operations/op-09-retrieve-affiliated-policies.md) | Load the legacy affiliate-policy list | Consumer reads obsolete affiliate members | Policy number, user context | `clsAffiliatedPolicyCollection` | [BR-VP-011](business-rules.md#br-vp-011-policy-always-affiliated-with-itself), [BR-VP-012](business-rules.md#br-vp-012-affiliated-policy-list-filtered-by-agentagency), [BR-VP-013](business-rules.md#br-vp-013-displayaffiliatedpolices-matrix-controls-display) | N/A — Stored procedure | [SQL-001](sql/SQL-001-getpolicyaffiliatelist.md), [SQL-014](sql/SQL-014-getpolicyaffiliatetype.md) |

## Process flow diagram
The following diagram visualizes the primary operational flow for retrieving and authorizing policy data.

```mermaid
flowchart TD
	Start([Consumer requests policy]) --> GetPolicy[GetPolicyData]
	GetPolicy --> Valid{Valid policy number?}
	Valid -->|No| Deny([Retrieve rejected])
	Valid -->|Yes| Retrieve["Execute<br>pk73094_policy_data.getpolicy"]
	Retrieve --> Populate[Populate clsPolicyData]
	Populate --> Authorize[IsPolicyValidForUser]
	Authorize -->|Secure policy, not authorized| DenyAccess([Access denied])
	Authorize -->|User-type matrix passes| Grant([Policy view returned])
	Authorize -->|Fails directly| ParentCheck[IsPolicyValidForParentPolicy]
	ParentCheck -->|Parent match| Grant
	ParentCheck -->|No match| DenyAccess
```

## Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under `operations/`.

| Operation | SQL | Tables | Type |
| --- | --- | --- | --- |
| [Retrieve policy data](operations/op-01-retrieve-policy-data.md) | [SQL-010](sql/SQL-010-getpolicy.md) | N/A — Stored procedure | Read |
| [Lazy retrieval of policy detail and indicators](operations/op-02-lazy-retrieve-policy-detail.md) | [SQL-011](sql/SQL-011-getviewdetail.md), [SQL-012](sql/SQL-012-get-policy-waiver-count.md), [SQL-015](sql/SQL-015-secondary-policy-status.md), [SQL-016](sql/SQL-016-coverage-bound-flag.md), [SQL-017](sql/SQL-017-info-page-printed.md), [SQL-018](sql/SQL-018-getgaps.md) | N/A — Stored procedure | Read |
| [Retrieve policy periods](operations/op-03-retrieve-policy-periods.md) | [SQL-021](sql/SQL-021-getspecificlimitsforpolicynum.md), [SQL-022](sql/SQL-022-getpolicyperiods.md) | N/A — Stored procedure | Read |
| [Retrieve policy associations](operations/op-04-retrieve-policy-associations.md) | [SQL-003](sql/SQL-003-period-date-query.md), [SQL-004](sql/SQL-004-non-typed-association-lookup.md), [SQL-005](sql/SQL-005-association-type-code-lookup.md), [SQL-034](sql/SQL-034-policy-association-list.md), [SQL-035](sql/SQL-035-max-policy-effective-date.md) | [ASSOCIATION_TYPE_CODE](database-tables.md#association_type_code), [POLICY](database-tables.md#policy), [POLICY_PERIOD](database-tables.md#policy_period), [POLICY_RELATIONSHIP](database-tables.md#policy_relationship), [COMBO_POLICY_PERIOD](database-tables.md#combo_policy_period), [ER_COMBINATION_POLICY](database-tables.md#er_combination_policy) | Read |
| [Retrieve the service team and derive email addresses](operations/op-05-retrieve-service-team.md) | [SQL-029](sql/SQL-029-cp-external-client-lookup.md), [SQL-030](sql/SQL-030-sp73341-external-client-lookup.md), [SQL-031](sql/SQL-031-team-assign-query.md) | N/A — Stored procedure | Read |
| [Retrieve addresses](operations/op-06-retrieve-addresses.md) | [SQL-007](sql/SQL-007-getpolicyaddress.md), [SQL-008](sql/SQL-008-getpolicyaddressbylocseqnum.md), [SQL-009](sql/SQL-009-officer-of-notice-lookup.md) | [BUSINESS_AFFILIATE](database-tables.md#business_affiliate), [AFFILIATE](database-tables.md#affiliate) | Read |
| [Authorize a user for a policy](operations/op-07-authorize-user.md) | [SQL-013](sql/SQL-013-getparentpolicy.md), [SQL-023](sql/SQL-023-cp-policy-in-group.md), [SQL-024](sql/SQL-024-auditor-access-count.md) | [PA_AUDIT](database-tables.md#pa_audit), [PA_AUDITOR](database-tables.md#pa_auditor), [PA_POLICY_PERIOD](database-tables.md#pa_policy_period) | Read |
| [Retrieve the accessible policy list for a user](operations/op-08-retrieve-accessible-policy-list.md) | [SQL-025](sql/SQL-025-cp-claimprofile-get-group-policy-list.md), [SQL-026](sql/SQL-026-cp-claimprofile-get-sc-book.md), [SQL-027](sql/SQL-027-cp-get-agent-online-policy-list.md), [SQL-028](sql/SQL-028-fee-auditor-policy-list.md) | N/A — Stored procedure | Read |
| [Retrieve affiliated policies (legacy)](operations/op-09-retrieve-affiliated-policies.md) | [SQL-001](sql/SQL-001-getpolicyaffiliatelist.md), [SQL-014](sql/SQL-014-getpolicyaffiliatetype.md) | N/A — Stored procedure | Read |

## Failure and edge-case behavior
- Lazy detail read (`LazyRead(PolicyDetail)`) catches and swallows exceptions, leaving detail fields at defaults ([BR-VP-026](business-rules.md#br-vp-026-detail-read-failure-does-not-fail-overall-retrieve)).
- Authorization checks return `Boolean`; no exception is thrown on denial, and nothing is logged inside this library.*
- The BDS (SQL Server) connection has no fallback: if `BDS_USER`, `bdsDatabase`, or `BDS_DATABASENAME` is missing or wrong, `clsPolicySecurity.Initialize()` still succeeds and the failure surfaces later as a connection error inside `IsInGroup` / `GetPolicyList*`.*

## Stored procedure operations

Operations implemented in Oracle and SQL Server stored procedures referenced by this library.

| Operation | Description | Source | Link |
| --- | --- | --- | --- |
| Retrieve policy view detail | Opens the policy view-detail cursor for a policy | `pk72846_view_policy.getviewdetail` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve policy periods | Returns the top-N (or all) policy periods with plan, group association and rating detail, masked per information-page status | `pk72846_view_policy.getpolicyperiods` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve agency for policy | Opens the agency cursor for a policy | `pk72846_view_policy.getagency` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve coverage gaps | Returns computed plus explicitly recorded coverage gaps | `pk72846_view_policy.getgaps` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve policy address | Returns the current address of the requested type with claim→policy fallback | `pk72846_view_policy.getpolicyaddress` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve address by location sequence | Returns a single address identified by location sequence number | `pk72846_view_policy.getpolicyaddressbylocseqnum` | [Details](procedures/pk72846-view-policy.md#operations) |
| Classify policy affiliation | Returns the affiliation classification token for a policy | `pk72846_view_policy.getpolicyaffiliatetype` | [Details](procedures/pk72846-view-policy.md#operations) |
| Resolve parent policy | Maps an affiliation classification to the governing parent policy number | `pk72846_view_policy.getparentpolicy` | [Details](procedures/pk72846-view-policy.md#operations) |
| List affiliated policies | Returns the affiliate list for a policy, optionally including totals | `pk72846_view_policy.getpolicyaffiliatelist` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve policy team assignments | Returns screen-ordered team members plus agent-of-record contact detail | `pk72846_view_policy.team_assign_query` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve MCO list | Returns managed-care organisation rows for a policy. Related tables: unknown — member absent from the retrieved package artifact | `pk72846_view_policy.getmco` | [Details](procedures/pk72846-view-policy.md#operations) |
| Retrieve policy header | Opens the policy header cursor including derived status and cancel status | `pk73094_policy_data.getpolicy` | [Details](procedures/pk73094-policy-data.md#operations) |
| Resolve account name | Returns the legal name of the best policy for an account number | `pk73094_policy_data.get_account_name` | [Details](procedures/pk73094-policy-data.md#operations) |
| Count policy waivers | Counts waiver detail rows for a policy; caller reduces to a Boolean `HasWaiver` | `Pk82033_ThirdParty.get_policy_waiver_count` | [Details](procedures/pk82033-thirdparty.md#operations) |
| Retrieve employer liability limits | Resolves specific or standard employer-liability limits for a policy period | `coveragelimits_pkg.getSpecificLimitsForPolicyNum` | [Details](procedures/coveragelimits-pkg.md#operations) |
| Derive cancel status | Derives a display cancel status from policy status group and collection/audit state | `sp72268_get_cancel_status` | [Details](procedures/sp72268-get-cancel-status.md#operations) |
| Check coverage bound | Returns `Y`/`N` indicating whether coverage is bound for a policy period | `sp73089_get_policy_bound_flag` | [Details](procedures/sp73089-get-policy-bound-flag.md#operations) |
| Check information page printed | Returns `Y`/`N` indicating whether the information page has printed | `SP72347_INFO_PAGE_PRINTED_YN` | [Details](procedures/sp72347-info-page-printed-yn.md#operations) |
| Look up external client email (Oracle) | Returns the external contractor email for a system user id + last name | `sp73341_external_client_lookup` | [Details](procedures/sp73341-external-client-lookup.md#operations) |
| Test policy group membership | Returns a count indicating whether a policy belongs to a group/chapter | `cp_policy_in_group` | [Details](procedures/cp-policy-in-group.md#operations) |
| List group policies | Returns the policy list visible to a group/chapter as of a report date | `cp_claimprofile_get_group_policy_list` | [Details](procedures/cp-claimprofile-get-group-policy-list.md#operations) |
| List safety-consultant book | Returns the active policy book for a loss-control consultant | `cp_claimprofile_get_sc_book` | [Details](procedures/cp-claimprofile-get-sc-book.md#operations) |
| List agent online policies | Returns active and recently closed policies for an agent or agency with display flags | `cp_get_agent_online_policy_list` | [Details](procedures/cp-get-agent-online-policy-list.md#operations) |
| Look up external client (BDS) | Returns the most recent active, non-test registrant matching id and last name | `cp_external_client_lookup` | [Details](procedures/cp-external-client-lookup.md#operations) |
| Retrieve policy associations (dynamic) | Executes the reference-data-supplied procedure to return association rows for a policy | `ASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME` | [Details](procedures/association-type-code-source-procedure-name.md#operations) |

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Configuration](configuration.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [Procedures](procedures/index.md)
- [API reference](api/index.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Policy/clsPolicyData.vb`
- `SAIF.Business.View.Policy/clsPolicySecurity.vb`
- `SAIF.Business.View.Policy/clsPolicyPeriod.vb`
- `SAIF.Business.View.Policy/clsTeamAssignment.vb`
- `SAIF.Business.View.Policy/clsTeamAssignmentCollection.vb`
- `SAIF.Business.View.Policy/Associations/clsPolicyAssociation.vb`
- `SAIF.Business.View.Policy/clsPolicySecurity.vb`
- `SAIF.Business.View.Policy/clsPolicyData.vb`
- `SAIF.Business.View.Policy/clsTeamAssignment.vb`
- `SAIF.Business.View.Policy/clsTeamAssignmentCollection.vb`
- `SAIF.Business.View.Policy/app.config`
- `SAIF.Business.View.Policy/Web.config`
